<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="/common/base.jsp"%>
<%
	//实例化AreaDao
	FamilyDao familyDao = new FamilyDao();
	Join_nhDao join_nhDao = new Join_nhDao();
	int[] grades = { 1, 2, 3 };
	List<Family> familyList = familyDao.findFamilyList();
	List<Join_nh> familyJoin_nhList = join_nhDao.findFamilyJoin_nhList();
	Family_memberDAO family_memberDao = new Family_memberDAO();
	List<Family_member> family_memberList=family_memberDao.findByKeyValue(null, null);
	
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base href="<%=basePath%>">

<title>家庭档案信息列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/admin.css">
<script src="js/jquery-1.4.4.min.js"></script>
<script src="js/admin.js"></script>
<script src="js/chdj.js"></script>
<script type="text/javascript">
    function getkey(a) {
        var pms = document.getElementById("keywords").value;
	//	alert(pms);
  a.href = '<%=path%>/biz/Ill_cardServle?m=find&IDcard=' + pms;
  }
function dj(a) {
        var label = document.getElementById("arr");
		var value = label.innerText.trim();	
  a.href = '<%=path%>/biz/Join_nhServlet?m=add&familyarr=' + value;
  }
</script>
<style>
/*全选框样式*/
input[type="checkbox"]{width:20px;height:20px;display: inline-block;text-align: center;vertical-align: middle; line-height: 18px;position: relative;}
input[type="checkbox"]::before{content: "";position: absolute;top: 0;left: 0;background: #fff;width: 100%;height: 100%;border: 1px solid #d9d9d9}
input[type="checkbox"]:checked::before{content: "\2713";background-color: #fff;position: absolute;top: 0;left: 0;width:100%;border: 1px solid #E0BD62;color:#E0BD62;font-size: 20px;font-weight: bold;}
/*隐藏滚动条，功能不变*/
html::-webkit-scrollbar {display:none}

#box_relative {
  position: relative;
  left: 85%;
  top: 46px;
}
#relative {
  position: relative;
  left: 0%;
  top: 10px;
}
</style>

<style>
	#yangshi1{ font-weight:bold ;font-size:20px}//字体样式1
	#yangshi2{ font-weight:800}//字体样式1
</style>
</head>
<body>
	<form method="post" action="" id="listform">
		<div class="panel admin-panel">
			<div class="padding border-bottom">
			
				<ul class="search" style="padding-left:10px;">
					<li>
					
					<input type="text" placeholder="请输入搜索关键字" name="keywords" id="keywords"
						value="<%=request.getParameter("IDcard")==null?"":request.getParameter("IDcard")%>"
						class="input" style="width:250px; line-height:17px;display:inline-block" list="family"/> 
						<datalist id="family" class="selectDate" aria-invalid="false"> 
							<%
						  for(Family_member m:family_memberList){ 
						
						  %>
							<option value="<%=m.getIDcard()%>"><%=m.getMembername()%></option>
							<%} %>

						</datalist >
						<a href="" onclick="getkey(this)" 
						class="button border-main icon-search"
						onclick="changesearch()"> 搜索</a>
						
						<button class="button bg-red icon-share-square-o" type="button" onclick="window.history.go(-1)">返回</button>

					</li>
				</ul>
				
			</div>
			
			<table class="table table-hover text-center">
				<tr>
					<th><input type="checkbox" id="allcheck"  onclick="demo()" />全选</th>
					<!-- <th>行政区域</th> -->
					<th>农合证号</th>
					<th>家庭编码</th>
					<th>姓名</th>
					<th>身份证号码</th>
					<th>与户主关系</th>
					<th>年龄</th>
					<th>职业</th>
					<th>操作</th>
				</tr>
				<c:forEach items="${list}" var="item">
				<tr>
					<c:if test="${'已参合' != item.ch_year}">
                    	<td><input type="checkbox" name="choice" class="checknum"  onclick="setAll()"
					value="${item.join_nh_code}" /></td>
                	</c:if>
                	<c:if test="${'已参合' == item.ch_year}">
                    	<td></td>
                	</c:if>
					<td>${item.join_nh_code}</td>
					<td>${item.familycode}</td>
					<td>${item.membername}</td>
					<td>${item.IDcard}</td>
					<td>${item.relation}</td>
					<td>${item.age}</td>
					<td>${item.occupation}</td>
					
                	<td>
                	<a class="button border-main icon-plus-square-o"
						href="<%=path%>/biz/Ill_cardServle?m=input&IDcard=${item.IDcard}&join_nh_code=${item.join_nh_code}&membername=${item.membername}">添加</a>
					</td>
					
					<%-- <td>${item.ch_year}</td> --%>
				</c:forEach>
			</table>
		</div>
	</form>

</body>
</html>
